package io.adrainty.bolee.insurance.web;

import io.adrainty.bolee.framework.commons.basic.ResultDTO;
import io.adrainty.bolee.framework.commons.utils.ResultDTOUtil;
import io.adrainty.bolee.insurance.models.entity.CategoryConditionEntity;
import io.adrainty.bolee.insurance.service.ICategoryService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>CategoryConditionController</p>
 *
 * @author AdRainty
 * @version V1.0.0
 * @description 分类筛选项
 * @since 2025/8/15 16:03:46
 */

@Tag(name = "分类筛选项")
@RestController
@RequestMapping("category-condition")
public class CategoryConditionController {

    @Resource
    private ICategoryService categoryService;

    @PostMapping("/list")
    @Operation(summary = "获取分类筛选项列表")
    public ResultDTO<List<CategoryConditionEntity>> categoryConditionList(@RequestBody CategoryConditionEntity entity) {
        List<CategoryConditionEntity> list = categoryService.findCategoryConditionList(entity);
        return ResultDTOUtil.success(list);
    }

}
